﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using CROSLAND.BL.BE;
using System.Data.Common;
using System.Data;

namespace CROSLAND.DL.DALC.MSSQL
{
    public class UbigeoDALC : BaseDALC, IUbigeoDALC
    {     
        #region Miembros de IUbigeoDALC

        public List<UbigeoBE> listUbigeos()
        {
            //IRfcFunction function = null; RfcDestination dest = null;
            //List<UbigeoBE> lst = new List<UbigeoBE>();
            //UbigeoBE obj = null;
            //try
            //{
            //    dest = DALC.getDestination();
            //    function = dest.Repository.CreateFunction("ZWEB_LISTA_UBIGEO");
            //    function.Invoke(dest);

            //    IRfcTable T_Ubigeo = function.GetTable("T_UBIGEO");
            //    foreach (IRfcStructure item in T_Ubigeo)
            //    {
            //        obj = new UbigeoBE();
            //        obj.UBIGEO = item.GetString("UBIGEO");
            //        obj.UBI_DEP = item.GetString("UBI_DEP");
            //        obj.UBI_PROV = item.GetString("UBI_PROV");
            //        obj.UBI_DIST = item.GetString("UBI_DIST");
            //        obj.UBI_NSE = item.GetString("UBI_NSE");

            //        lst.Add(obj);
            //    }
            //}
            //catch (Exception ex)
            //{
            //    throw ex;
            //}
            //finally
            //{
            //    //RfcDestinationManager.UnregisterDestinationConfiguration(dc);
            //}
            //return lst;
            return null;
        }

        #endregion
    }
}
